package com.runda.partypolicy.app.repository;

import com.blankj.utilcode.util.CacheDiskUtils;
import com.google.gson.Gson;
import com.runda.partypolicy.app.repository.api.APIServiceCreator;
import com.runda.partypolicy.app.repository.db.LocalDB;


import javax.inject.Inject;

/**
 * author:  RD_YH
 * date:    2018/10/10
 * version: v1.0
 * description: 用户仓库
 */
public class Repository_User {

    private Gson gson;
    private LocalDB localDB;
    private CacheDiskUtils cacheUtil;
    private APIServiceCreator api;

    @Inject
    public Repository_User(
            Gson gson, LocalDB localDB,
            CacheDiskUtils cacheUtil, APIServiceCreator api) {
        this.api = api;
        this.gson = gson;
        this.localDB = localDB;
        this.cacheUtil = cacheUtil;
    }

    /**
     * 获取用户数据
     */
//    public Flowable<RepositoryResult<UerInfoData>> getInfoData() {
//        return api.getRequester().getInfoData("meaningless");
//    }

//    public Flowable<RepositoryResult<LoginData>> login(String username, String password) {
//        return api.getRequester().login(username, password);
//    }
//
//    public Flowable<RepositoryResult<VerifyCodeData>> getVerifyCode(String phoneNo) {
//        return api.getRequester().getVerifyCode(phoneNo);
//    }
//
//    public Flowable<RepositoryResult<VerifyCodeData>> checkVerifyCode(String phoneNo,String verifyCode) {
//        return api.getRequester().checkVerifyCode(phoneNo,verifyCode);
//    }
//
//
//    public Flowable<RepositoryResult<VerifyCodeData>> getNextVerifyCode(String phoneNo,String verifyCode) {
//        return api.getRequester().getNextVerify(phoneNo,verifyCode);
//    }
//
//    public Flowable<RepositoryResult<CommonData>> resetPassword(String phoneNo, String password) {
//        return api.getRequester().resetPassword(phoneNo, password);
//    }
//
//    public Flowable<RepositoryResult<CommonData>> updatePassword(String phoneNo, String password,String newPwd) {
//        return api.getRequester().updatePassword(phoneNo, password,newPwd);
//    }
//
//    public Flowable<RepositoryResult<UserDetail>> getUserDetail(@Nullable String id) {
//        return api.getRequester().getUserDetail("meaningless", id);
//    }
//
//    public Flowable<RepositoryResult<UserDetail>> getUserDetailById(String id) {
//        return api.getRequester().getUserDetailById("id");
//    }
//
//    public Flowable<RepositoryResult<EmptyData>> exit() {
//        return api.getRequester().exit("meaningless");
//    }
//
//    public Flowable<RepositoryResult<List<ContactsListData>>> getContactListDetail(@Nullable String name) {
//        return api.getRequester().getContactListDetail("meaningless", name);
//    }
//
//    public Flowable<RepositoryResult<Integer>> updateUserDetail(@Body UserDetail userDetail) {
//        return api.getRequester().updateUserDetail(userDetail);
//    }
//
//    public Flowable<RepositoryResult<UploadImageData>> upLoadImage(File imageFile) {
//        Map<String, RequestBody> map = new HashMap<>();
//        RequestBody body_file = RequestBody.create(MediaType.parse("image/*"), imageFile);
//        map.put("file\"; filename=\"" + imageFile.getName() + "", body_file);
//        return api.getRequester().upLoadImage(map);
//    }
//
//    public Flowable<RepositoryResult<InspectCenterEntity>> centerFunUpdate( int funId) {
//        return api.getRequester().centerFunUpdate(funId);
//    }
//
//    public Flowable<RepositoryResult<List<InspectCenterEntityRecent>>> getCenterFunctionRecentList() {
//        return api.getRequester().getCenterFunctionRecentList("meanlingless");
//    }
//
//    public Flowable<RepositoryResult<List<InspectCenterEntity>>> getCenterFunctionList() {
//        return api.getRequester().getCenterFunctionList("meanlingless");
//    }
}
